home *** CD-ROM | disk | FTP | other *** search
- int column_count;
- DBPROCESS *dbproc;
-
- /* put the commands into the command buffer */
- dbcmd(dbproc, "select name, id, type from sysobjects");
- dbcmd(dbproc, " select name from sysobjects");
-
- /* send the commands to \*S and start execution */
- dbsqlexec(dbproc);
-
- /* process each command until there are no more */
- while (dbresults(dbproc) != NO_MORE_RESULTS)
- {
- column_count = dbnumcols(dbproc);
- printf("%d columns in this \*S result.\\n",
- column_count);
- while (dbnextrow(dbproc) != NO_MORE_ROWS)
- printf("row received.\\n");
- }
-